﻿@page "/Warehouses/Add"
@page "/Warehouses/{warehouseId:int}/Edit"
@using Microsoft.AspNetCore.Authorization

@attribute [Authorize]

<MudText Typo="Typo.h4" Class="mb-8">Lager bearbeiten</MudText>

<MudForm Model="@warehouse" @ref="@_form">
    <MudGrid>
        <MudItem xs="6">

            <MudTextField @bind-Value="warehouse.Name"
                          For="@(() => warehouse.Name)"
                          Label="Lagername"
                          Required="true"
                          Variant="Variant.Text"
                          InputType="InputType.Text"
                          Class="mt-6" />

            <MudButton Variant="Variant.Filled"
                       Color="Color.Primary"
                       Size="Size.Large"
                       ButtonType="ButtonType.Button"
                       OnClick="@(Save)"
                       Class="mt-6">Speichern</MudButton>
        </MudItem>
    </MudGrid>
</MudForm>